# Contributor: Rasmus Thomsen <oss@cogitri.dev>
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Rasmus Thomsen <oss@cogitri.dev>
pkgname=gexiv2
pkgver=0.12.1
pkgrel=0
pkgdesc="a GObject-based wrapper around the Exiv2 library"
url="https://wiki.gnome.org/Projects/gexiv2"
arch="all"
license="GPL-2.0-or-later"
makedepends="exiv2-dev meson py3-gobject3 glib-dev gtk-doc
	gobject-introspection-dev vala"
subpackages="$pkgname-dev"
source="https://download.gnome.org/sources/gexiv2/${pkgver%.*}/gexiv2-$pkgver.tar.xz"
replaces="libgexiv2"

build() {
	meson \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		--buildtype=plain \
		-Dgtk_doc=true \
		-Dintrospection=true \
		-Dvapi=true \
		. output
	ninja -C output
}

check() {
	ninja -C output test
}

package() {
	DESTDIR="$pkgdir" ninja -C output install
}

sha512sums="cbf83ea79eead9aab15ba760217fd6a1b55a5c60059f14f243327ad7d3c09d6a0528dbdb33a8ee235c76dac5aab0afa8b7d2ab4367fe9128a096dce5da19a68d  gexiv2-0.12.1.tar.xz"
